package com.example.cpms.mapper;

import com.example.cpms.entity.Warning;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WarningMapper {

    /**
     * 根据id删除告警记录
     * @param id
     */
    @Delete("delete from warning where id = #{id}")
    void deleteById(Integer id);

    /**
     * 告警记录分页查询
     * @param poleName
     * @return
     */
    List<Warning> list(String poleName);

    @Delete("delete form warning where id = #{id")
    void delete(Integer id);

    List<Warning> list(String poleName, String poleNumber, Integer handelStatus);

}
